/***********************************************************************
 * Module:  Module.java
 * Author:  guazi
 * Purpose: Defines the Class Module
 ***********************************************************************/
package com.li.sssp.entity;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@Cacheable
/** @pdOid 9b1e3167-5474-4775-9fac-1f9b80859af6 */
public class Module {
	/** @pdOid 0920fca4-5495-4757-8d65-ee475e449ef0 */
	private int id;
	/** @pdOid 6ce12389-7031-417d-9bb0-29a776ca2183 */
	private String name;

	private String Url;
	
	private Integer parentId;
	
	/**
	 * 多对一的关系，父模块
	 */
	//private ModuleMast moduelMast;

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}


	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public String getUrl() {
		return Url;
	}

	public void setUrl(String url) {
		Url = url;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}






	

	@Override
	public String toString() {
		return "Module [id=" + id + ", name=" + name + ", Url=" + Url + ", parentId=" + parentId + "]";
	}

	public Module(int id, String name, String url, Integer parentId) {
		super();
		this.id = id;
		this.name = name;
		Url = url;
		this.parentId = parentId;
	}

	public Module() {
		super();
		// TODO Auto-generated constructor stub
	}

}